package com.example.shoppingmall.service;

import com.example.shoppingmall.dao.ArticleMapper;
import com.example.shoppingmall.pojo.Articlelist;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class ArticleService{
    @Autowired
    ArticleMapper articleMapper;

    public List<Articlelist> getarticlelistall(String create, String upddate, String status, String sorts, String updatedate, String title, String Articlelist, Integer pageno, Integer pageSize) {
        return articleMapper.getarticlelistall(create, upddate, status, sorts, updatedate, title, Articlelist, pageno, pageSize);
    }

    public int allcount(String updatedate, String title, String Articlelist) {
        return articleMapper.allcount(updatedate, title, Articlelist);
    }

    public int delarticle(Integer id){
        return articleMapper.delarticle(id);
    }

    public int updarticle(Articlelist articlelist){
        return articleMapper.updarticle(articlelist);
    }

    public Articlelist selarticle(Integer id){
        return articleMapper.selarticle(id);
    }

    public int addarticle(Articlelist articlelist){
        return articleMapper.addarticle(articlelist);
    }
}
